package com.core.dao.mybatismysql;

import com.core.bean.Online;
import com.core.dao.IDoubleDao;
import com.core.utils.MybatisUtils;
import org.apache.ibatis.session.SqlSession;

import java.util.List;
/**
 * 双端登陆业务
 * */
public class DoubleDao implements IDoubleDao {
    /**
     * 查询在线用户的设备信息
     * @param  user
     * @return
     * @throws Exception
     */
    @Override
    public List<Online> querydevInfo(String user) throws Exception {
        SqlSession session = MybatisUtils.getSession();
        IDoubleDao mapper = session.getMapper(IDoubleDao.class);
        List<Online> onlines = mapper.querydevInfo(user);
        return onlines;
    }

    @Override
    public int add(Online entity) throws Exception {
        return 0;
    }

    @Override
    public int remove(String id) throws Exception {
        return 0;
    }

    @Override
    public int modify(Online entity) throws Exception {
        return 0;
    }

    @Override
    public Online findEntityById(String id) throws Exception {
        return null;
    }
}
